home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / octa209s.zip / octave-2.09 / liboctave / LP.h < prev    next >
C/C++ Source or Header  |  1996-03-03  |  2KB  |  88 lines

  1. /*
  2.  
  3. Copyright (C) 1996 John W. Eaton
  4.  
  5. This file is part of Octave.
  6.  
  7. Octave is free software; you can redistribute it and/or modify it
  8. under the terms of the GNU General Public License as published by the
  9. Free Software Foundation; either version 2, or (at your option) any
  10. later version.
  11.  
  12. Octave is distributed in the hope that it will be useful, but WITHOUT
  13. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15. for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with Octave; see the file COPYING.  If not, write to the Free
  19. Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20.  
  21. */
  22.  
  23. #if !defined (octave_LP_h)
  24. #define octave_LP_h 1
  25.  
  26. #include "dColVector.h"
  27. #include "Bounds.h"
  28. #include "LinConst.h"
  29. #include "base-min.h"
  30.  
  31. class LP : public base_minimizer
  32. {
  33. public:
  34.  
  35.   LP (void)
  36.     : base_minimizer (), c (), bnds (), lc () { }
  37.  
  38.   LP (const ColumnVector& c_arg)
  39.     : base_minimizer (), c (c_arg), bnds (), lc () { }
  40.  
  41.   LP (const ColumnVector& c_arg, const Bounds& b)
  42.     : base_minimizer (), c (c_arg), bnds (b), lc () { }
  43.  
  44.   LP (const ColumnVector& c_arg, const Bounds& b, const LinConst& l)
  45.     : base_minimizer (), c (c_arg), bnds (b), lc (l) { }
  46.  
  47.   LP (const ColumnVector& c_arg, const LinConst& l)
  48.     : base_minimizer (), c (c_arg), bnds (), lc (l) { }
  49.  
  50.   LP (const LP& a)
  51.     : base_minimizer (a), c (a.c), bnds (a.bnds), lc (a.lc) { }
  52.  
  53.   LP& operator = (const LP& a)
  54.     {
  55.       if (this != &a)
  56.     {
  57.       base_minimizer::operator = (a);
  58.  
  59.       c = a.c;
  60.       bnds = a.bnds;
  61.       lc = a.lc;
  62.     }
  63.       return *this;
  64.     }
  65.  
  66.   ~LP (void) { }
  67.  
  68.   ColumnVector linear_obj_coeff (void) const { return c; }
  69.  
  70.   Bounds bounds (void) const { return bnds; }
  71.  
  72.   LinConst linear_constraints (void) const { return lc; }
  73.  
  74. protected:
  75.  
  76.   ColumnVector c;
  77.   Bounds bnds;
  78.   LinConst lc;
  79. };
  80.  
  81. #endif
  82.  
  83. /*
  84. ;;; Local Variables: ***
  85. ;;; mode: C++ ***
  86. ;;; End: ***
  87. */
  88.